package com.zelin.rabbit.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener(queues = "fruits-pear")
@Component
public class MQListener6 {

    //1.监听得到消息(主题模式)
    @RabbitHandler
    public void getMessage(String message){
        System.out.println("消费者接收到消息(pear)："+message);
    }

}
